var oIpt = document.getElementsByClassName('c_top_right')[0].getElementsByTagName('input')[0];
var oJg = document.getElementsByClassName('jg')[0];
var oJg1 = document.getElementsByClassName('jg1')[0];
var oDp = document.getElementsByClassName('dropdown1')[0];
var oImg = document.getElementsByClassName('c_img')[0].getElementsByTagName('img')[0];
var oLi = document.getElementsByClassName('c_img')[0].getElementsByTagName('ul')[0].getElementsByTagName('li');
var len = oLi.length;
// alert(oLi);
oIpt.onfocus = function () {
    oJg.style.display = "none";
    oJg1.style.display = "none";
    oDp.style.display = "block";
}
oIpt.onblur = function () {
    oJg.style.display = "block";
    oJg1.style.display = "block";
    oDp.style.display = "none";
}
 for (var i=0;i<len;i++) {
    oLi[i].index = i;
    oLi[i].onclick = function () {
        for (var j=0;j<len;j++) {
            oLi[j].style.backgroundColor = "#ccc";
        }
        this.style.backgroundColor = "red";
        oImg.src = "./assets/images/" + (this.index+1) + ".png";
    }
 }
